
import re
# msg = "i am hxli"
# msg2 = "i am xuxu"
# msg3 = "we are human"
# reg = re.compile("am")
# print(reg.findall(msg))
# print(reg.findall(msg2))
# print(reg.findall(msg3))
# ret = re.findall("python","Python 3 python")
# print(ret)
# ret = re.findall("[Ppfg]ython","Python 3 python fython Fython")
# print(ret)
# ret = re.findall("[a-zA-Z\-]","abcABC123-")
# print(ret)
###1###
# while True:
#     a = input("请输入你要判断的东西,输入exit退出")
#     if a == "exit":
#         print("退出")
#         break
#     if re.findall(r"^\+?[1-9]\d*$",a) != [] :
#         print("这是正整数")
#     if re.findall(r"^\-{1}\+?[1-9]\d*$",a) != []:
#         print("这是负整数")
#     if re.findall(r"^\-?\+?[1-9]\d*\.\+?[0-9]\d*$",a) != []:
#         print("这是浮点数")
#     else:
#         print("这什么都不是")

#############2##################

# a = input("请输入你要验证的密码（要求以下划线开头）：")
# b = re.findall(r"(^\_{1}|^\[A-Za-z]{1})",a)
# c = len(a)
# if b == []:
#     print("没有字母或者下划线开头")
#     exit()
# if  c > 10 :
#     print("该密码长度太长")
# elif c <8:
#     print("该密码长度太短")
# else:
#     print("该密码合法")
##########3###############3
# a = input("请输入你要输入的字符串：")
#
# if re.findall(r"(\+86){1}[0-9]{11}",a) != []:
#     print(re.findall(r"(\+86){1}[0-9]{11}",a))
# elif re.findall(r"[0-9]{3}\-[0-9]{4}\-[0-9]{4}",a) != []:
#     print(re.findall(r"[0-9]{3}\-[0-9]{4}\-[0-9]{4}",a))
# elif re.findall(r"[0-9]{3}\ [0-9]{4}\ [0-9]{4}",a) != []:
#     print(re.findall(r"[0-9]{3}\ [0-9]{4}\ [0-9]{4}",a))
# elif re.findall(r"[0-9]{11}",a) != []:
#     print(re.findall(r"[0-9]{11}",a))








































